package netty5.serializable.messagepack;

import org.msgpack.MessagePack;
import org.msgpack.template.Template;
import org.msgpack.template.Templates;
import org.msgpack.type.Value;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by GanJc on 2015/11/21.
 */
public class MessagePackDemo {

    public static void main(String[] args) throws IOException {
        ArrayList<String> list = new ArrayList<String>();
        list.add("aaa");
        list.add("逗逼");
        list.add("女王");
        list.add("无爱");
        MessagePack pack = new MessagePack();
        byte[] write = pack.write(list);
        System.out.println(write.length);
        List<String> read = pack.read(write, Templates.tList(Templates.TString));

        System.out.println(read);


    }
}
